﻿<!-- Prix du Net App for Chrome™

	Prix du Net App for Chrome™ est une application destinée au Chrome Web Store permettant d'acchéder à Prix du Net.
	Elle dispose de fonctionnalités spécifiques, telles que la notification de nouvelles actualités, dossiers, bons plans...

	Main author : LEGRAND David
	Mail : david@pcinpact.com
	
	Google Code Project : http://pci.im/code-pci-chrome 
	Forum : http://pci.im/forum-pci-chrome
	
    This file is part of Prix du Net App for Chrome™.

    Prix du Net App for Chrome™ is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Prix du Net App for Chrome™ is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Prix du Net App for Chrome™.  If not, see <http://www.gnu.org/licenses/>. 
 
    You're not allowed to use PC INpact name or logo without permission -->

<html>
    <head>
        <script type="text/javascript" src="/js/main.js"></script>
		<script type="text/javascript" src="/js/notify.js"></script>
		<script type="text/javascript" src="/js/rss.js"></script>
		<script>
            function init() {
				// On gère le cas du changement de valeur pour notif_check
				if (localStorage["notif_ckeck"] != 0 && localStorage["notif_ckeck"] != 1) localStorage["notif_ckeck"] = 1;

				// On gère les valeurs par défaut des options
				if (!localStorage["notif_delay"]) localStorage["notif_delay"] = 15;
				if (!localStorage["notif_ckeck"]) localStorage["notif_ckeck"] = 1;
				
				if (!localStorage["bonplan_delay"]) localStorage["bonplan_delay"] = 1;
				if (!localStorage["actu_delay"]) localStorage["actu_delay"] = 1;
				if (!localStorage["dossier_delay"]) localStorage["dossier_delay"] = 15;
				if (!localStorage["test_delay"]) localStorage["test_delay"] = 15;
				
				// On check une première fois le flux RSS des bons plans, actus, ...
				check_rss('rss_bonplan.xml', 'bonplan', 34);
				check_rss('rss_actu.xml', 'actu', 36);
				check_rss('rss_dossier.xml', 'dossier', 37);
				check_rss('rss_test.xml', 'test', 25);

				// Puis on recommence toutes les X minutes
				var interval_bonplan = localStorage["bonplan_delay"] * 60 * 1000;
				var timer_bonplan = setInterval("check_rss('rss_bonplan.xml', 'bonplan', 34)", interval_bonplan);
				
				var interval_actu = localStorage["actu_delay"] * 60 * 1000;
				var timer_actu = setInterval("check_rss('rss_actu.xml', 'actu', 36)", interval_actu);
				
				var interval_dossier = localStorage["dossier_delay"] * 60 * 1000;
				var timer_dossier = setInterval("check_rss('rss_dossier.xml', 'dossier', 37)", interval_dossier);
				
				var interval_test = localStorage["test_delay"] * 60 * 1000;
				var timer_test = setInterval("check_rss('rss_test.xml', 'test', 25)", interval_test);
            }
        </script>
    </head>

    <body onload="init()">
    </body>

</html>